/*
 * @Author: zheguo 3188606474@qq.com
 * @Date: 2024-04-19 19:30:06
 * @LastEditors: zheguo 3188606474@qq.com
 * @LastEditTime: 2024-04-20 23:59:52
 * @FilePath: \projectOne\myexpress\app\router\userRouter\user.router.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
/*
 * @Author: zheguo 3188606474@qq.com
 * @Date: 2024-04-19 19:30:06
 * @LastEditors: zheguo 3188606474@qq.com
 * @LastEditTime: 2024-04-20 21:25:02
 * @FilePath: \ProjectAction\projectOne\myexpress\app\router\userRouter\user.router.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
module.exports = app => {
    const userController = require("../../controllers/user/user.controller")

    const router = require("express").Router();
    //  注册路由  /register/
    // 注册信息，提交数据
    router.post("/register", userController.create)

    app.use("/Allin", router)

    // 登录路由
    router.get("/login", userController.findone)

    // 获取所有用户信息
    router.get("/admin", userController.findAll)
    // 删除用户
    router.delete("/delete", userController.delete)
    // 修改用户
    router.post("/updated", userController.update)
}